package org.lds.simple.disruptor.producer.sequencer;

import org.lds.simple.disruptor.SequenceBarrier;
import org.lds.simple.disruptor.sequence.Sequence;

public interface Sequencer {
    SequenceBarrier getSequenceBarrier();
    void setSequenceBarrier(SequenceBarrier sequenceBarrier);
    Sequence getSequence();
    void updateSequence(long sequence);
    void notifyConsumer();

    long next();
    long allowProduce(long currProducerSequence, long currMinConsumerSequence);
    long allowProduce();
}
